package demo2;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.sql.Connection;

public class Test {
    public static void main(String[] args) {

        try {
            AnnotationConfigApplicationContext context
                    = new AnnotationConfigApplicationContext("demo2");
            DBUtil dbutil = context.getBean(DBUtil.class);
            System.out.println(dbutil);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
